<?php
// +---------------------------------------------------------------------+
// | OneBase    | [ WE CAN DO IT JUST THINK ]                            |
// +---------------------------------------------------------------------+
// | Licensed   | http://www.apache.org/licenses/LICENSE-2.0 )           |
// +---------------------------------------------------------------------+
// | Author     | Bigotry <3162875@qq.com>                               |
// +---------------------------------------------------------------------+
// | Repository | https://gitee.com/Bigotry/OneBase                      |
// +---------------------------------------------------------------------+

namespace app\common\validate;

/**
 * 版本验证器
 */
class Version extends ValidateBase
{
    
    // 验证规则
    protected $rule = [
        'title'  => 'require|unique:version',
        'download_url'     => 'require',
        'download_url_ios'    => 'require',
    ];

    // 验证提示
    protected $message = [
        'title.require'    => '标题不能为空',
        'title.unique'     => '标题已存在',
        'download_url.require'       => '安卓下载链接不能为空',
        'download_url_ios.require'      => 'IOS下载链接不能为空',
    ];

    // 应用场景
    protected $scene = [
        'edit'  =>  ['title','version','download_url','download_url_ios'],
    ];

}
